﻿using ClassLibrary;
using HinduShop.Domain.Models.Account;

namespace HinduShop.UI.ViewModels.Account
{
    public class EditRolesViewModel
    {
        public EditRolesViewModel()
        {
        }

        public EditRolesViewModel(User user)
        {
            UserId = user.Id;
            UserName = user.UserName;

            AdminChecked = (user.Roles & RolesEnum.Administrator) != 0;
            UserChecked = (user.Roles & RolesEnum.User) != 0;
        }

        public int UserId { get; set; }
        public string UserName { get; set; }

        public bool AdminChecked { get; set; }
        public bool UserChecked { get; set; }
    }
}